<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>animation练习</title>
        <style>
            #header{width:100%;background-color: black;display: inline-block;
                position: relative;margin:0;padding:0;
                overflow: hidden;
                text-align: center;}
            
            #header h1{
                color:red;
                animation: flag 5s linear infinite;
            }
            @keyframes flag {
                0%{transform: translateX(-50%);}
                100%{transform: translateX(50%);}
            }
        </style>
    </head>
    <body style="padding:0;margin:0;">
        <div id="header"><h1>欢迎光临佛山职业技术学院</h1></div>
    </body>
</html>